//
//  ViewController.m
//  homework
//
//  Created by dllo on 16/6/13.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import "MyScrollView.h"
#import "PictureView.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self createSubView];

}


#pragma mark - 创建UIScrollView
-(void)createSubView
{
    PictureView *picture = [[PictureView alloc]initWithFrame:CGRectMake(0, 0, 300, 400)];
    
    picture.center = self.view.center;
    
    [self.view addSubview:picture];
    
    [picture release];
    
    /**创建图片数组*/
    UIImage *image1 = [UIImage imageNamed:@"haha.png"];
    UIImage *image2 = [UIImage imageNamed:@"barca.png"];
    UIImage *image3 = [UIImage imageNamed:@"china.png"];
    
    picture.imageArray = @[image3, image1, image2, image3, image1];
    
}


@end
